package com.zhong.gang.pda.ui.action.deliver.controller;

import android.view.View;

import com.zhong.gang.applib.controller.ImgController;
import com.zhong.gang.applib.ui.adapter.AddImgAdapter;
import com.zhong.gang.applib.config.Config;
import com.zhong.gang.pda.databinding.ActivityDeliverBinding;
import com.zhong.gang.pda.ui.action.HuoBean;
import com.zhong.gang.pda.ui.action.HuoPersenter;
import com.zhong.gang.pda.ui.action.deliver.DeliverAct;

public abstract class BaseDeliverController extends HuoPersenter {
    protected AddImgAdapter allAdapter;
    protected DeliverAct act;
    protected ActivityDeliverBinding bind;
    protected int id;
    protected ImgController imgController;
    protected HuoBean huoBean;

    public BaseDeliverController(DeliverAct act,int id) {
        this.act = act;
        this.id = id;
        bind = act.bind;
        imgController = new ImgController();
        bind.allRecyclerView.setNestedScrollingEnabled(false);
        allAdapter = imgController.initImgAdapter(act,bind.allRecyclerView,Config.ALL_CLICKED);
        imgController.addImgView(allAdapter,"",true);
        bind.fahuo.setText(bind.delete);

    }
    /**
     * 放入过磅信息
     * @param data
     */
    public void setScalesMsg(HuoBean data){
        this.huoBean = data;
        bind.carStatus.setText(data.getCarStatus() == 1?"场内":"场外");
        bind.carNum.setText(data.getCarNum());
        bind.huoFeet.setData(data);
    }
}
